home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / sregexpf / sgregexp.idl < prev    next >
Encoding:
Text File  |  1998-07-16  |  3.4 KB  |  111 lines

  1.  
  2.  
  3. import "oaidl.idl";
  4. import "ocidl.idl";
  5.  
  6.     [
  7.         object,
  8.         uuid(CC7B6646-DF3B-11D1-AAC0-00C0DF4A4D6C),
  9.         dual,
  10.         helpstring("ISubstring Interface"),
  11.         pointer_default(unique)
  12.     ]
  13.     interface ISubstring : IDispatch
  14.     {
  15.         [propget, id(DISPID_VALUE), helpstring("Matched substring after a successful Match")] 
  16.             HRESULT Value([out, retval] BSTR* res);
  17.         [propget, id(1), helpstring("Returns 1 based offset of the matched substring from the beginning of the string used in Match")] 
  18.             HRESULT Start([out, retval] long* res);
  19.         [propget, id(2), helpstring("Returns the length of the matched substring")] 
  20.             HRESULT Length([out, retval] long* res);
  21.     };
  22.  
  23.     [
  24.         object,
  25.         uuid(CC7B6648-DF3B-11D1-AAC0-00C0DF4A4D6C),
  26.         dual,
  27.         helpstring("ISubstrings Interface"),
  28.         pointer_default(unique)
  29.     ]
  30.     interface ISubstrings : IDispatch
  31.     {
  32.         [propget, id(DISPID_VALUE), helpstring("Returns specified substring")] 
  33.             HRESULT Item([in] short index, [out, retval] ISubstring** res);
  34.         [propget, restricted, id(DISPID_NEWENUM)] 
  35.             HRESULT _NewEnum([out, retval] IUnknown** res);
  36.         [propget, id(1), helpstring("Returns number of substrings in the Substrings collection")] 
  37.             HRESULT Count([out, retval] short* res);
  38.     };
  39.  
  40.     [
  41.         object,
  42.         uuid(CC7B6644-DF3B-11D1-AAC0-00C0DF4A4D6C),
  43.         dual,
  44.         helpstring("IsgRegExp Interface"),
  45.         pointer_default(unique)
  46.     ]
  47.     interface IsgRegExp : IDispatch
  48.     {
  49.         [propput, id(1), helpstring("Returns or sets regular expression")]
  50.             HRESULT Expression([in] BSTR expr);
  51.  
  52.         [propget, id(1), helpstring("Returns or sets regular expression")]
  53.             HRESULT Expression([out, retval] BSTR* expr);
  54.  
  55.         [propput, id(2), helpstring("Returns or sets case sensitivity. If True the regular expression is compiled so that differences in case are ignored when matching")]
  56.             HRESULT IgnoreCase([in] VARIANT_BOOL ignoreCase);
  57.  
  58.         [propget, id(2), helpstring("Returns or sets case sensitivity. If True the regular expression is compiled so that differences in case are ignored when matching")]
  59.             HRESULT IgnoreCase([out, retval] VARIANT_BOOL* ignoreCase);
  60.  
  61.         [id(3), helpstring("Examine given string with the regular expression, returning true if there is a match")]
  62.             HRESULT Match([in] BSTR data, [in, optional, defaultvalue(-1)] VARIANT startPos, [out, retval] VARIANT_BOOL* res);
  63.  
  64.         [propget, id(4), helpstring("Returns replacement string")]
  65.             HRESULT ReplaceString([in] BSTR source, [out, retval] BSTR* res);
  66.  
  67.         [propget, id(5), helpstring("Return the status of the last regular expression compilation")]
  68.             HRESULT CompiledOK([out, retval] VARIANT_BOOL* res);
  69.  
  70.         [propget, id(6), helpstring("Returns collection of matched substrings after a successful Match")]
  71.             HRESULT Substrings([out, retval] ISubstrings** res);
  72.     };
  73.  
  74. [
  75.     uuid(CC7B6637-DF3B-11D1-AAC0-00C0DF4A4D6C),
  76.     version(1.0),
  77.     helpstring("Stinga Regular Expression Library")
  78. ]
  79. library sgRegExp
  80. {
  81.     importlib("stdole32.tlb");
  82.     importlib("stdole2.tlb");
  83.  
  84.     [
  85.         uuid(CC7B6645-DF3B-11D1-AAC0-00C0DF4A4D6C),
  86.         helpstring("Stinga Regular Expression Object")
  87.     ]
  88.     coclass RegExp
  89.     {
  90.         [default] interface IsgRegExp;
  91.     };
  92.     [
  93.         uuid(CC7B6647-DF3B-11D1-AAC0-00C0DF4A4D6C),
  94.         noncreatable,
  95.         helpstring("Substring Object")
  96.     ]
  97.     coclass Substring
  98.     {
  99.         [default] interface ISubstring;
  100.     };
  101.     [
  102.         uuid(CC7B6649-DF3B-11D1-AAC0-00C0DF4A4D6C),
  103.         noncreatable,
  104.         helpstring("Substrings Collection")
  105.     ]
  106.     coclass Substrings
  107.     {
  108.         [default] interface ISubstrings;
  109.     };
  110. };
  111.